package com.neusoft.neuiotms.dcam.fixed.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.Length;

import com.neusoft.bizcore.web.jpa.model.AbstractAuditModel;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Entity
@Table(name = "neuiot_warehouse_record")
@org.hibernate.annotations.Table(appliesTo = "neuiot_warehouse_record", comment = "出入库记录表")
public class WarehouseRecord extends AbstractAuditModel {

    private static final long serialVersionUID = 1L;

    /** 资产名称 */
    @NotBlank(message = "资产名不能为空")
    @Length(max = 255, message = "资产名不能超过{max}位")
    @Column(length = 255, nullable = false)
    private String name;

    /** 规格型号 */
    @Length(max = 255, message = "规格型号不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String specifications;

    /** 品牌 */
    @Length(max = 255, message = "品牌不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String brand;

    /** 小类型名称 */
    @Length(max = 255, message = "小类型名称不能超过{max}位")
    @Column(length = 255, nullable = false)
    private String smallTypeName;

    /** 小类型编码 */
    @Length(max = 255, message = "小类型编码名称不能超过{max}位")
    @Column(length = 255, nullable = false)
    private String smallTypeCode;

    /** 合同号 */
    @Length(max = 255, message = "合同号不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String contractNo;

    /** 合同名称 */
    @Length(max = 255, message = "合同名称不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String contractName;

    /** 数量 */
    @Column(nullable = true)
    private int amount = 1;

    /** 位置 */
    @Length(max = 255, message = "位置不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String location;

    /** 位置名称 */
    @Length(max = 255, message = "位置名称不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String locationName;

    /** 出入库类型 */
    @Length(max = 255, message = "出入库类型不能超过{max}位")
    @Column(length = 255, nullable = true)
    private String type;
}
